import { ThemeProvider } from "@/components/theme-provider";
import "./globals.css";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { AppSidebar } from "@/components/app-siderbar";
import { Toaster } from "sonner";
import Header from "@/components/Header";

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <head>
      </head>
      <body>
        <ThemeProvider
            attribute="class"
            defaultTheme="system"
            enableSystem
            disableTransitionOnChange
          >
          {/* <Header /> */}
          <SidebarProvider className="">
            
            <AppSidebar />
            <SidebarInset>
              <main className="">
                {children}
              </main>
            </SidebarInset>
          </SidebarProvider>
          <Toaster /> {/* Toast 将在此处渲染 */}
        </ThemeProvider>
      </body>
    </html>
  );
}
